<?php

/**
 * Default home page view
 *  
 * @author Nguyen Hai Ha
 * @version 1.0
 */
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<meta name="keywords" content=""/>
		<meta name="description" content=""/>	
		<link href="<?php echo $this->baseUrl; ?>/public/favicon.ico" rel="shortcut icon" />	
		<title><?php echo 'Eway.vn: Con duong lam giau ngan nhat!'; ?></title>
		<link href="<?php echo $this->baseUrl; ?>/public/styles/frontend/common.css" type="text/css" rel="stylesheet" />
		<link href="<?php echo $this->baseUrl; ?>/public/styles/frontend/article.css" type="text/css" rel="stylesheet" />
		<script type="text/javascript" src="<?php echo $this->baseUrl; ?>/public/scripts/jquery/jquery-1.2.6.pack.js"></script>
		<script type="text/javascript" src="<?php echo $this->baseUrl; ?>/public/scripts/jquery/jquery.ifixpng-1.7.js"></script>
		<script type="text/javascript" src="<?php echo $this->baseUrl; ?>/public/scripts/frontend.js"></script>
	</head>
	<body>
		<div align="center" id="top_line">
			<div id="top_content">
			<?php
				$auth = new Zend_Session_Namespace(Constant::SESSION_NAMESPACE);
				$currentRole = $auth->currentRole;
			?>
			<?php if ($currentRole == Constant::GUEST){ ?>
				Chào mừng bạn!&nbsp;|&nbsp;<a class="top" href="<?php echo $this->baseUrl; ?>" style="font-weight: bold;">Trang chủ</a>&nbsp;|&nbsp;<a class="top" href="<?php echo $this->baseUrl; ?>/account/signin" style="font-weight:bold">Đăng nhập</a>&nbsp;|&nbsp;<a class="top" href="<?php echo $this->baseUrl; ?>/account/register" style="font-weight: bold;">Đăng ký</a>
			<?php 
				} else {
					$name = Zend_Auth::getInstance()->getIdentity()->usr_fullname;
					$role =  Zend_Auth::getInstance()->getIdentity()->usr_role; 
			?>
				Chào mừng bạn đã trở lại!&nbsp;|&nbsp;<a class="top" href="<?php echo $this->baseUrl."/".$role; ?>" style="font-weight: bold;">Trang chủ</a>&nbsp;|&nbsp;<a class="top" href="<?php echo $this->baseUrl; ?>/account/signout" style="font-weight:bold">Thoát</a>
			<?php } ?>				
			</div>
		</div>
		<div align="center">
			<div id="content">
				<!--  Logo -->
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
					<tr>
						<td id="logo"><a href="<?= $this->baseUrl ?>"><img src="<?php echo $this->baseUrl; ?>/public/images/frontend/logo.jpg" border="0" style="padding: 0px; margin: 0px;" /></a></td>
						<td align="right" width="70%">
							<div style="float: right">
								<div style="float: right; margin-left: 10px">
									<table cellpadding="0" cellspacing="0" border="0" class="sub_button_center2">
										<tr>
											<td class="sub_button_left2">&nbsp;</td>
											<td style="padding: 0 10px 0 10px;"><a class="sub_button" href="<?= $this->baseUrl ?>/news">Tin Eway</a></td>
											<td class="sub_button_right2">&nbsp;</td>
										</tr>
									</table>
								</div>
								<div style="float: right; margin-left: 10px">
									<table cellpadding="0" cellspacing="0" border="0" class="sub_button_center">
										<tr>
											<td class="sub_button_left">&nbsp;</td>
											<td style="padding: 0 10px 0 10px;"><a class="sub_button" href="#my-eway">Quản lý hàng</a></td>
											<td class="sub_button_right">&nbsp;</td>
										</tr>
									</table>
								</div>
								<div style="float: right; margin-left: 10px">
									<table cellpadding="0" cellspacing="0" border="0" class="sub_button_center">
										<tr>
											<td class="sub_button_left">&nbsp;</td>
											<td style="padding: 0 10px 0 10px;"><a class="sub_button" href="#post-item">Post hàng</a></td>
											<td class="sub_button_right">&nbsp;</td>
										</tr>
									</table>
								</div>
								<div style="float: right; margin-left: 10px">
									<table cellpadding="0" cellspacing="0" border="0" class="sub_button_center">
										<tr>
											<td class="sub_button_left">&nbsp;</td>
											<td style="padding: 0 10px 0 10px;"><a class="sub_button" href="<?= $this->baseUrl ?>/search">Tìm kiếm</a></td>
											<td class="sub_button_right">&nbsp;</td>
										</tr>
									</table>
								</div>
							</div>
						</td>
					</tr>
				</table>
				<? echo $this->render("navigation_nofocus.phtml"); ?>
				<div style="height: 8px;">&nbsp;</div>
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
					<tr>
						<td width="100%" valign="top" style="padding: 0px;">						